<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <!-- 序列的操作 -->
    <#assign list=[1,123,12,1234,12345,123456] />
    <#list list as l>
        <b>${l_index + 1}.</b>
        <b>${l}</b>
        <#if l=12345><#break></#if>
        <#if l_has_next>,</#if>
    </#list>
    <hr>
    ${list?first}<br>
    ${list?last}<br>
    <#list list?reverse as l>
        <b>${l}</b>
        <#if l_has_next>,</#if>
    </#list><br>
    ${list?size}<br>
    <#list list?sort as l>
        <b>${l}</b>
        <#if l_has_next>,</#if>
    </#list><br>
    <!-- hash-->
    <#assign map={"name":"张三","age":"16"} />
    <#list map?keys as m>
        <b>${m}</b>
        <#if m_has_next>,</#if>
    </#list><br>
    <#list map?values as m>
        <b>${m}</b>
        <#if m_has_next>,</#if>
    </#list><br>
    <!-- 字符串函数 -->
    <#assign str="hello word" />
    <#assign num="12345" />
    ${str?substring(1,3)}<br>
    ${str?cap_first}<br>
    ${str?uncap_first}<br>
    ${str?capitalize}<br>
    ${str?ends_with("rd")?string}<br>
    ${str?html}<br>
    ${str?index_of("d",-1)}<br>
    ${str?length}<br>
    ${str?lower_case}<br>
    ${str?upper_case}<br>
    ${str?contains("a")?string}<br>
    ${num?number}<br>
    ${str?replace("o","*")}<br>
        <#list str?split("o") as m>
        <b>${m}</b>
        <#if m_has_next>,</#if>
    </#list><br>
    ${str?trim}<br>
    <!-- 零碎用法 -->
    <#assign number=0.3 />
    ${number?c?is_string?string}<br>
    ${number?string.computer}<br>
    ${number?string.percent}<br>
    <!-- 大于号小于号 -->
    <#assign t=6 />
    <#if (t>5)>
        t>5
    </#if>
    <#if t gt 5>
        t>5
    </#if>

</body>
</html>